﻿<?php
//------- INIT

require_once("include.php");

//------- DATA VERIFICATION

if (isset($_GET['id']) && intval($_GET['id']) > 0) {
	$member = Member::load($_GET['id']);
} else {
	$member = $login;
}

//------- LOGIC
/*$name; // Name of the member
$groups[]; // A list/array of the groups the member is in
$events[]; // A list/array of the events the member is in
$event;
$task;
$tasks[]; // A list/array of the tasks the member has
$contact; // ID of the contact. Might be null if none is connected? */




//------- HTML
top();
?>
<div id="top">
	<div id="topLeft">
	</div>
	<div id="topRight">
	<? echo $member->name; ?>
	<? foreach( $member->groups as $groupId => $groupName) { 	?>
		<p><a href="group.php?id=<? echo $groupId;?>"><? echo $groupName; ?></a></p>
	<? } ?>
	</div>
</div>
<div id="bottom">
	<div id="bottomLeft">
		<? foreach( $member->tasks as $task) { 	?>
		<p><? echo $task; ?></p>
		<? } ?>
	</div>
	<div id="bottomRight">
		<? foreach( $member->events as $event) { 	?>
		<p><? echo $event; ?></p>
		<? } ?>

	</div>
</div>
<?php
bottom();
?>